cmake_minimum_required(VERSION 3.16)

project(PaintIsland)

set(CMAKE_CXX_STANDARD 20)

list(APPEND ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake/)

include_directories(${PROJECT_SOURCE_DIR}/External/glad/include)
include_directories(${PROJECT_SOURCE_DIR}/Framework)
include_directories(${PROJECT_SOURCE_DIR}/Game)
include_directories(${CMAKE_CURRENT_LIST_DIR}/GUI)

find_package(glm QUIET)

if (NOT glm_FOUND)
    message(STATUS "GLM not found. Trying to find glm from GLM_ROOT.")
    set(glm_DIR $ENV{GLM_ROOT}/cmake/glm)
    find_package(glm CONFIG REQUIRED)
endif()


add_subdirectory(External)
add_subdirectory(Framework)

add_executable(PaintIsland "")

if (WIN32)
    set_target_properties(PaintIsland PROPERTIES WIN32_EXECUTABLE true)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/Game/CMakeLists.txt)

target_link_libraries(PaintIsland Framework)